project(zlog)

set(LIB_NAME "zpsoe_zlog")

set(LIB_POSTFIX "")

set(SRC_LIST ../zlog.cxx)

add_definitions("-DZPSOE_BUILD_SHARED_LIB")

add_library(${LIB_NAME} SHARED ${SRC_LIST})

set_target_properties(${LIB_NAME} PROPERTIES
    DEBUG_POSTFIX "${LIB_POSTFIX}D"
    RELEASE_POSTFIX "${LIB_POSTFIX}"
    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
    LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
    ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
    )

install(TARGETS ${LIB_NAME}
    LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
    ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
    RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

install(DIRECTORY ../../include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include )
